<div class="ibox">
    <div class="ibox-title notselect">
        <h5>商户资料&ensp;<span style="font-size:12px">编号：<span id="number"></span></span></h5>
    </div>
    <div class="ibox-content">
        <style type="text/css">
            .layui-form-radio span,.layui-table td, .layui-table th {
                font-size:12px;
            }
            .layui-table thead th strong {
                font-size: 16px;
            }

            .layui-table[lay-size=lg] td.line {
                padding: 0;
                border: unset;
            }

            .layui-table, .layui-table-view, .layui-card-body .layui-table {
                margin: 0;
            }

                .layui-table[lay-size=lg].total td, .layui-table[lay-size=lg].total th {
                    padding: 15px 15px;
                }

            .titleT {
                margin-bottom: 10px;
                font-size: 16px;
                font-weight: bold;
            }

            .operateT {
                font-size: 16px;
                margin: 0 -8px;
            }

                .operateT a {
                    margin: 0 8px;
                    color: #2d80ac;
                }

            .layui-rate {
                padding: 0;
            }

            .headline {
                margin-top: 15px;
            }

                .headline .layui-col-xs4 {
                    width: unset;
                    font-size: 16px;
                    font-weight: bold;
                }

            .headline1 {
                border-bottom: 3px solid #6899ec;
            }

            .headline2 {
                border-bottom: 3px solid #e5e5e5;
            }

            .headline3 {
                border-bottom: 3px solid #6899ec;
                text-align: right;
            }

            .model-form .model-form-body {
                padding: 30px;
            }

            .type_s {
                float: left;
                color: #FF2F2F;
                font-size: 16px;
                background-color: #FFF4F5;
                border: #FF2F2F solid 1px;
                -moz-border-radius: 6px;
                -webkit-border-radius: 6px;
                border-radius: 6px;
                text-align: center;
                width: 60px;
                line-height: 30px;
            }

            .sell {
                color: #3E98E2;
                background-color: #EDF6FE;
                border: #3E98E2 solid 1px;
            }
        </style>
        <form class="layui-form">
            <div class="layui-fluid" style="padding: unset;">
                <div class="layui-card">
                    <!--div class="layui-card-header">编辑</div-->
                    <div class="layui-card-body" style="padding: unset;">
                        <table class="layui-table total" lay-size="lg" lay-skin="line">
                            <tbody>
                                <tr class="line">
                                    <td>
                                        <table style="width:100%;">
                                            <tbody>
                                                <tr>
                                                    <td style="border:0;padding:0;width:100px">
                                                        <img src="{$data.tx}"
                                                             width="70" height="74" style="margin:0;" />
                                                    </td>
                                                    <td style="border:0;padding:0;">
                                                        <p class="titleT">（<span style="color:#4c98c9">买</span>）{$data.buy.name}&emsp;{if $data.uc=='sell'}（<span style="color:#ff610d">卖</span>）{$data.sell.name}{/if}</p>
                                                        <p class="operateT">
                                                            <a data-tips="确定要清安全码吗？" data-update="{$data.id}" data-field='safe' data-value='123456' data-action='{:url("safe")}'>清安全码</a>
                                                            <a data-title="密码重置" data-modal='{:url("password")}?bh={$data.bh}' href="javascript:void(0)">密码重置</a>
                                                            <a href="{:url('login')}?bh={$data.bh}" target="_blank">进入后台</a>
                                                        </p>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </td>
                                </tr>
                                <tr class="line">
                                    <td>
                                        <p><strong>联系方式</strong></p>
                                        <table style="width:100%;margin-top:5px;">
                                            <tbody>
                                                <tr>
                                                    <td style="border:0;padding:0;width:20%;">邮箱：{$data.email}</td>
                                                    <td style="border:0;padding:0;width:20%;">电话：{$data.phone}</td>
                                                    <td style="border:0;padding:0;width:60%;">
                                                        <span>（买）QQ号码：{$data.buy.contact}&ensp;[<span style="color:#67a5b6">加好友</span>]</span>&emsp;
                                                        <span>（卖）QQ号码：8888888888&ensp;[<span style="color:#67a5b6">加好友</span>]</span>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </td>
                                </tr>
                                <tr class="line">
                                    <td>
                                        <p><strong>账号情况</strong></p>
                                        <table style="width:100%;margin-top:5px;">
                                            <tbody>
                                                <tr>
                                                    <td style="border:0;padding:0;width:20%;">可用余额：<span id="amounts">{$data.money}</span>&ensp;[<a style="color:#d9aa86" data-title="改变金额" data-modal='{:url("money")}?bh={$data.bh}' href="javascript:;">改变金额</a>]</td>
                                                    <td style="border:0;padding:0;width:20%;">可用积分：<span id="integrals">{$data.jifen}</span>&ensp;[<a style="color:#7bc18b" data-title="改变积分" data-modal='{:url("jifen")}?bh={$data.bh}' href="javascript:;">改变积分</a>]</td>
                                                    <td style="border:0;padding:0;width:20%;">注册时间：{$data.sj}</td>
                                                    <td style="border:0;padding:0;width:40%;">最后登录：{$data.gxtime}</td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </td>
                                </tr>
                                <tr class="line">
                                    <td>
                                        <p><strong>安全情况</strong></p>
                                        <table style="width:100%;margin-top:5px;">
                                            <tbody>
                                                <tr>
                                                    <td style="border:0;padding:0;width:20%;">邮箱验证：<a data-title="邮箱验证" data-modal='{:url("email")}?bh={$data.bh}' href="javascript:void(0)">{if $data.email_zt==1}已验证{else}未验证{/if}</a></td>
                                                    <td style="border:0;padding:0;width:20%;">手机验证：<a data-title="手机验证" data-modal='{:url("phone")}?bh={$data.bh}' href="javascript:void(0)">{if $data.phone_zt==1}已验证{else}未验证{/if}</a></td>
                                                    <td style="border:0;padding:0;width:20%;">QQ绑定：<a href="javascript:void(0)">未绑定</a></td>
                                                    <td style="border:0;padding:0;width:20%;">支付宝：<a href="javascript:void(0)">未绑定</a></td>
                                                    <td style="border:0;padding:0;width:20%;">安全码：<a data-title="安全码" data-modal='{:url("safe")}?bh={$data.bh}' href="javascript:void(0)">{if $data.safe_code!=null}已设置{else}未设置{/if}</a></td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </td>
                                </tr>
                                <tr class="line">
                                    <td>
                                        <p><strong>交易情况</strong></p>
                                        <table style="width:100%;margin-top:5px;">
                                            <tbody>
                                                <tr>
                                                    <td style="border:0;padding:0;width:20%;">买家信誉：{$data.b_xy}</td>
                                                    <td style="border:0;padding:0;width:20%;">买入交易：{$data.d1}笔</td>
                                                    <td style="border:0;padding:0;width:20%;">卖家信誉：{$data.s_xy}</td>
                                                    <td style="border:0;padding:0;width:20%;">卖出交易：{$data.d2}笔</td>
                                                    <td style="border:0;padding:0;width:20%;">卖出退款：{$data.d3}笔</td>
                                                </tr>
                                            </tbody>
                                        </table>
                                        <!--table style="width:100%;margin-top:5px;">
                                            <tbody>
                                                <tr>
                                                    <td style="border:0;padding:0;width:20%;">销售额：0.00元</td>
                                                    <td style="border:0;padding:0;width:20%;">源码数：1148个</td>
                                                    <td style="border:0;padding:0;width:60%;">仓库源码数：4个</td>
                                                </tr>
                                            </tbody>
                                        </table-->
                                    </td>
                                </tr>
                                <tr class="line">
                                    <td>
                                        <p><strong>审核状态</strong></p>
                                        <div class="ew-tb-cell-ck">
                                            <div class="layui-inline">
                                                <input type="radio" name="type" value="1" title="正常" {if $data.zt==1}checked{/if} lay-filter="audit">
                                                <input type="radio" name="type" value="2" title="审核不通过" {if $data.zt==2}checked{/if} lay-filter="audit">
                                            </div>
                                            <div class="layui-inline {if $data.zt==1}layui-hide{/if}" id="audit">
                                                <input type="text" name="auditTxt" lay-verify="title" autocomplete="off" placeholder="请输入原因" class="layui-input" style="width:300px;" value="{$data.ztsm}">
                                            </div>
                                            <a class="layui-btn layui-btn-primary" id="auditSubmit">确认</a>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                        <div class="layui-row headline">
                            <div class="layui-col-xs4" style="width:10%">
                                <p class="headline1"><span style="color:#ff6600">充值</span><span style="color:#265892">Top10</span></p>
                            </div>
                            <div class="layui-col-xs4" style="width:80%">
                                <p class="headline2">&ensp;&ensp;</p>
                            </div>
                            <div class="layui-col-xs4" style="width:10%">
                                <p class="headline3"><span style="color:#265892">共</span><span style="color:#ff6600">{$data.c2}</span><span style="color:#265892">笔</span></p>
                            </div>
                        </div>
                        <table class="table table-hover">
                            <colgroup>
                                <col style="width:25%">
                                <col style="width:25%">
                                <col style="width:25%">
                                <col style="width:25%">
                            </colgroup>
                            <thead>
                                <tr>
                                    <th>充值时间</th>
                                    <th>充值编号</th>
                                    <th>充值金额</th>
                                    <th>充值信息</th>
                                </tr>
                            </thead>
                            <tbody>
							{foreach($data.a1 as $v)}
                                <tr>
                                    <td>{$v.sj}</td>
                                    <td>{$v.bh}</td>
                                    <td><span style="color:#7bc18b">+</span> {$v.money1}</td>
                                    <td>{$v.bz}</td>
                                </tr>
							{/foreach}
                            </tbody>
                        </table>
                        <div class="layui-row headline">
                            <div class="layui-col-xs4" style="width:10%">
                                <p class="headline1"><span style="color:#ff6600">提现</span><span style="color:#265892">Top10</span></p>
                            </div>
                            <div class="layui-col-xs4" style="width:80%">
                                <p class="headline2">&ensp;&ensp;</p>
                            </div>
                            <div class="layui-col-xs4" style="width:10%">
                                <p class="headline3"><span style="color:#265892">共</span><span style="color:#ff6600">{$data.b2}</span><span style="color:#265892">笔</span></p>
                            </div>
                        </div>
                        <table class="table table-hover">
                            <colgroup>
                                <col style="width:16.66666666666667%">
                                <col style="width:16.66666666666667%">
                                <col style="width:16.66666666666667%">
                                <col style="width:16.66666666666667%">
                                <col style="width:16.66666666666667%">
                            </colgroup>
                            <thead>
                                <tr>
                                    <th>提现时间</th>
                                    <th>提现编号</th>
                                    <th>收款类型</th>
                                    <th>收款账号</th>
                                    <th>收款人</th>
                                    <th>取消提现</th>
                                </tr>
                            </thead>
                            <tbody>
							{foreach($data.b1 as $v)}
                                <tr>
                                    <td>{$v.create_at}</td>
                                    <td>{$v.bh}</td>
                                    <td>{$v.type_name}</td>
                                    <td>{$v.bankid}</td>
                                    <td>{$v.truename}</td>
									{if($v.status==0)}<td><b><font class='gray'><a href='javascript'>撤消申请</a></font></b></td>{/if}
									{if($v.status==1)}<td><b><font color="#56AA16">提现成功</font></b></td>		 {/if}
									{if($v.status==2)}<td><b><font color="red">提现失败</font></b></td>{/if}
									{if($v.status==3)}<td><b><font class="gray">撤消提现</font></b></td>{/if}		
                                </tr>
							{/foreach}
                            </tbody>
                        </table>
                        <div class="layui-row headline">
                            <div class="layui-col-xs4" style="width:10%">
                                <p class="headline1"><span style="color:#ff6600">交易</span><span style="color:#265892">Top20</span></p>
                            </div>
                            <div class="layui-col-xs4" style="width:80%">
                                <p class="headline2">&ensp;&ensp;</p>
                            </div>
                            <div class="layui-col-xs4" style="width:10%">
                                <p class="headline3"><span style="color:#265892">共</span><span style="color:#ff6600">{$data.c2}</span><span style="color:#265892">笔</span></p>
                            </div>
                        </div>
                        <table class="table table-hover">
                            <colgroup>
                                <col style="width:10%">
                                <col style="width:10%">
                                <col style="width:10%">
                                <col style="width:25%">
                                <col style="width:10%">
                                <col style="width:10%">
                                <col style="width:10%">
                                <col style="width:10%">
                                <col style="width:10%;">
                            </colgroup>
                            <thead>
                                <tr>
                                    <th>类型</th>
                                    <th>订单号</th>
                                    <th>对方信息</th>
                                    <th>交易商品</th>
                                    <th>开始时间</th>
                                    <th>结束时间</th>
                                    <th>交易额</th>
                                    <th>发货方式</th>
                                    <th style="text-align:right">交易状态</th>
                                </tr>
                            </thead>
                            <tbody>
							{foreach($data.c1 as $v)}
                                <tr>
                                    <td>
										{if $v.sell==$data.bh}<b class="type_s sell">售出</b>{/if}
										{if $v.buy==$data.bh}<b class="type_s">买入</b>{/if}
									</td>
                                    <td>{$v.ddbh}</td>
                                    <td>
										{if $v.sell==$data.bh}<font color="#FF2F2F">买家</font>：TizSam{/if}
										{if $v.buy==$data.bh}<font color="#3A9CD4">卖家</font>：TizSam{/if}									
                                       
                                        <br>QQ：2945203989
                                        <br>电话：18926529643
                                    </td>
                                    <td>
                                        <a target="_blank" href="{$v.url}">【{:typename($v.type)}】{$v.tit} </a>
                                    </td>
                                    <td>{$v.sj}</td>
                                    <td>{$v.etime}</td>
                                    <td>
                                        <b style="color:#ff6600;font-size:18px;"><font style="  font-family: Georgia;font-size:12px;">￥</font>{$v.money1}</b>
                                        <br>
                                        <font color="#999999">中介费：<font style="  font-family: Georgia;font-size:12px;">￥</font>16</font>
                                    </td>
                                    <td>
                                        <font color="#0033ff">自动发货</font>
                                        <!--br>
                                        取货网盘链接：
                                        <br>
                                        <font color="#999">https://pan.baidu.com/s/1JPcfY4fZDOy2XYHrHlguhQ</font>
                                        <br>
                                        取货网盘密码：
                                        <font color="#999">q99v</font-->
                                    </td>
                                    <td style="text-align:right">
										{if $v.ddzt=='success'}
										<font color="green">交易完成</font>
                                        {elseif $v.ddzt=='backsuc'}
										<font color="red">退款完成</font>
										{else/}
										<font color="green">正在交易</font>
										{/if}										
                                    </td>
                                </tr>
							{/foreach}
                                <!--tr>
                                    <td>
                                        <b class="type_s">买入</b>
                                    </td>
                                    <td>
                                        160084038278
                                    </td>
                                    <td>
                                        <font color="#3A9CD4">卖家</font>：TizSam
                                        <br>
                                        QQ：2945203989
                                        <br>
                                        电话：18926529643
                                    </td>
                                    <td>
                                        <a target="_blank" href="/code/goods1217.html">【源码】3月7日更新拼多多出码系统,pdd出码系统,pdd通道,拼多多渠道pdd支付安全稳定 </a>
                                    </td>
                                    <td>
                                        2020-09-23 13:53:19
                                    </td>
                                    <td>
                                        2020-09-23 13:53:19
                                    </td>
                                    <td>
                                        <b style="color:#ff6600;font-size:18px;"><font style="  font-family: Georgia;font-size:12px;">￥</font>800.00</b>
                                        <br>
                                        <font color="#999999">中介费：<font style="  font-family: Georgia;font-size:12px;">￥</font>16</font>
                                    </td>
                                    <td>
                                        <font color="#0033ff">自动发货</font>
                                        <br>
                                        取货网盘链接：
                                        <br>
                                        <font color="#999">https://pan.baidu.com/s/1JPcfY4fZDOy2XYHrHlguhQ</font>
                                        <br>
                                        取货网盘密码：
                                        <font color="#999">q99v</font>
                                    </td>
                                    <td style="text-align:right">
                                        <font color="green">交易完成</font>
                                    </td>
                                </tr-->
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </form>
        <script type="text/javascript">
            layui.use(['layer', 'form', 'table'], function () {
                var $ = layui.jquery;
                var layer = layui.layer;
                var form = layui.form;

                function getQueryVariable(variable) {
                    var query = window.location.hash;
                    var vars = query.split("?")[1].split("&");
                    for (var i = 0; i < vars.length; i++) {
                        var pair = vars[i].split("=");
                        if (pair[0] == variable) { return pair[1]; }
                    }
                    return (false);
                }

                $("#auditSubmit").click(function () {
                    var loadIndex = layer.load(2);
                    $.post('/admin/member/state', {
                        bh: getQueryVariable("bh"),
                        type: $('input[name="type"]:checked').val(),
                        auditTxt: $('input[name="auditTxt"]').val()
                    }, function (res) {
                        layer.close(loadIndex);
                        if (res.code === 1) {
                            layer.msg(res.msg, { icon: 1 });
                        } else {
                            layer.msg(res.msg, { icon: 2 });
                        }
                    }, 'json');
                    return false;
                });

                form.on('radio(audit)', function (data) {
                    if (data.value == 2) {
                        $("#audit").removeClass("layui-hide");
                    } else {
                        $("#audit").addClass("layui-hide");
                    }
                    return false;
                });

                $("#number").text(getQueryVariable("bh"));

                form.render();
            });
        </script>
    </div>
</div>